package com.rainbow.bam.entity;

import javax.persistence.Column;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 角色权限中间表实体类
 * 
 * @author zhaolei
 * @version $Id: HtDutyAction.java, v 0.1 2015年11月19日 下午5:31:00 zhaolei Exp $
 */
@Entity
@Table(name = "ht_duty_action")
@NamedQuery(name = "HtDutyAction.findAll", query = "SELECT c FROM HtDutyAction c")
public class HtDutyAction implements java.io.Serializable {

    /**
     * UUID
     */
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Id
    @GeneratedValue(generator = "identity")
    @GenericGenerator(name = "identity", strategy = "identity")
    @Column(unique = true, nullable = false, name = "duty_action_id")
    private Long        id;
    /**
     * 关联权限
     */
    @ManyToOne
    @JoinColumn(name = "action_id")
    private HtSrcAction htSrcAction;

    /**
     * 关联角色
     */
    @ManyToOne
    @JoinColumn(name = "duty_id")
    private HtDuty htDuty;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public HtSrcAction getHtSrcAction() {
        return htSrcAction;
    }

    public void setHtSrcAction(HtSrcAction htSrcAction) {
        this.htSrcAction = htSrcAction;
    }

    public HtDuty getHtDuty() {
        return htDuty;
    }

    public void setHtDuty(HtDuty htDuty) {
        this.htDuty = htDuty;
    }

}
